<?php
use yii\widgets\ActiveForm;

$form = ActiveForm::begin([
        "options" => ["enctype" => "multipart/form-data"],
        "action" => ['upload/upload'],
        'method' => 'post'
    ]);
?>
<?= $form->field($model, "file")->fileInput() ?>

<button>Submit</button>

<?php ActiveForm::end(); ?>
